package com.example.springbootrabbitmq.demo5delayqueue;

import com.example.springbootrabbitmq.config.Constant;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * <p><em>Created on 2022/8/27 9:06 下午</em></p>
 * 延时队列
 *
 * @author fuzhongtang
 * @since 1.0.1
 */
/*

@Component
public class DelayQueueSender {

    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void send() {
        String msg1 = "I am delay.message msg1======";
        System.out.println("sender1: " + msg1);
        rabbitTemplate.convertAndSend(Constant.DELAY_EXCHANGG, "delay.message", msg1);

        String msg2 = "I am delay.message2 msg2######";
        System.out.println("sender2: " + msg2);
        rabbitTemplate.convertAndSend(Constant.DELAY_EXCHANGG, "delay.message2", msg2);

        String msg3 = "I am delay.message3 msg3######";
        System.out.println("sender3: " + msg3);
        rabbitTemplate.convertAndSend(Constant.DELAY_EXCHANGG, "delay.message3", msg3);
    }

}
*/
